package com.gxa.global;

import com.gxa.common.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GlobalException {

    @ExceptionHandler(Throwable.class)
    @ResponseBody
    public Result checkException(){

        Result result = new Result();
        result.setCode(500);
        result.setMsg("系统繁忙，请稍后再试！");
        return result;
    }
}
